package com.gt.quality.base.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author makeJava
 */
@Data
public class CommonTree<T> implements Serializable {

    /**
     * Description:  主键id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(title = "id",description = "主键id")
    private Long id;

    /**
     * Description:  上级节点ID
     */
    @TableField(value = "pid")
    @Schema(title = "pid",description = "上级节点ID")
    protected Long pid;


    @TableField(exist = false)
    protected List<T> children;
}
